package stuff;

import java.util.ArrayList;
import java.util.List;


/**
 * This class holds the months in a calendar. It uses an array list to hold the months. 
 * 
 * @author Matthew Edwards 
 * @version 3-5-11
 */


public class AppointmentCalendar{
    
    private final List<AppointmentMonth> months;

	/**
	 * This constructor creates a new Appointment Calendar by adding the months
	 * into the calendar via the array add method.
	 * 
	 * @param month
	 *            The first month that will go into the calendar.
	 */
    public AppointmentCalendar(AppointmentMonth month){
    	months = new ArrayList<AppointmentMonth>();
    	months.add(month);
    }
    
    /**
     * Adds a month to the database by  using the array add function. 
     * 
     * @param input The month to be input into the calendar. 
     * @param month The index of the month to be put into the calendar. 
     */
    public void add(AppointmentMonth input, int index){
        months.add(index, input);
    }
    
    /**
     * Gets the months inside the calendar
     * 
     * @return The months in the calendar and returns them as an array list.
     */
    public List<AppointmentMonth> getMonths(){
        return months;
    }
    
}